package com.huanying.goodjob.callcenter;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.huanying.framework.adminuser.Adminuser;
import com.huanying.goodjob.job.Jobitem;
import com.huanying.goodjob.job.Jobitem_User;

@Entity
@Table(name = "jobitem_call")
public class Jobitem_call implements Serializable {
	private static final long serialVersionUID = -657999628176113432L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	
	@OneToOne(cascade = CascadeType.ALL,optional = false)
	@JoinColumn(name = "jobitem_id")
	private Jobitem jobitem;    //具体工作
	@OneToOne(cascade = CascadeType.ALL)
	@JoinColumn(name = "adminuser_id")
	private Adminuser adminuser;   //登陆者
	private int jobitem_type;//工作项的类别  1 有人接单 2 工长发起开工请求 3工人发起返工请求
	private int call_status;//0未打电话 1已打电话
	@Column(name = "status", nullable = false, columnDefinition = "INT default 1")
	private int status;    //状态
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}

	public Jobitem getJobitem() {
		return jobitem;
	}
	public void setJobitem(Jobitem jobitem) {
		this.jobitem = jobitem;
	}
	public Adminuser getAdminuser() {
		return adminuser;
	}
	public void setAdminuser(Adminuser adminuser) {
		this.adminuser = adminuser;
	}
	public int getJobitem_type() {
		return jobitem_type;
	}
	public void setJobitem_type(int jobitem_type) {
		this.jobitem_type = jobitem_type;
	}
	public int getCall_status() {
		return call_status;
	}
	public void setCall_status(int call_status) {
		this.call_status = call_status;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
}
